From de50134d24d6d93e2a9db063dbaf3cacfbb5e69a Mon Sep 17 00:00:00 2001 From: oliskoli Date: Wed, 19 Apr 2006 21:41:37 +0000 Subject: [PATCH] Initialize 'un-initialized' vars detected by valgrind. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1914 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/hsa_ndv.c | 1 + gpsbabel/mkshort.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/gpsbabel/hsa_ndv.c b/gpsbabel/hsa_ndv.c index 92a91fb47..7b680b3e6 100644 --- a/gpsbabel/hsa_ndv.c +++ b/gpsbabel/hsa_ndv.c @@ -228,6 +228,7 @@ hsa_ndv_read(void) { char *bad; + buf[len] = 0; if (NULL != strstr(buf, "nver=1")) {//its the older format, not xml fseek(fd, 0, SEEK_SET); diff --git a/gpsbabel/mkshort.c b/gpsbabel/mkshort.c index d99d28bcb..5949c0d75 100644 --- a/gpsbabel/mkshort.c +++ b/gpsbabel/mkshort.c @@ -481,7 +481,10 @@ mkshort(short_handle h, const char *istring) */ if ( hdl->target_len < 15) { replaced = 1; + } else { + replaced = 0; } + while (replaced && strlen(ostring) > hdl->target_len) { ostring = delete_last_vowel(2, ostring, &replaced); } -- 2.30.2